﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PersonInfoControl.ascx.cs"
    Inherits="PersonInfoControl" %>

<script type="text/javascript"  >
 
    var PersonInfoControl = new Object();

    $(document).ready(function() {
    
        $('#PersonForm').dialog({
			autoOpen: false,
			height: 300,
			width: 350,
			modal: true});    
    
    });    
    
    function ShowForm() {
        
        $('#PersonForm').dialog("open");
		
    }

    function Save() {
        
        PersonInfoControl.FirstName = $('[id*=tbFirstName_CC4493FF_29A4_4511_B5A3_FBB261A59D4F]').val();
        PersonInfoControl.LastName = $('[id*=tbLastName_CC4493FF_29A4_4511_B5A3_FBB261A59D4F]').val();
        
        //alert(PersonInfoControl.FirstName);
        
        $('[id*=hiddenPersonInfoControlData_CC4493FF_29A4_4511_B5A3_FBB261A59D4F]').val(JSON.stringify(PersonInfoControl));  
        
        //var selectorVal = '[id*=' + '<=  HiddenFieldName %>' + ']';         
        //$(selectorVal).val(JSON.stringify(PersonInfoControl));   
         
        $('#PersonForm').dialog("close");   

    }  
      
</script>

<input type="button" value="Show Form" onclick="ShowForm();" />

<input type="hidden" runat="server" id="hiddenPersonInfoControlData_CC4493FF_29A4_4511_B5A3_FBB261A59D4F" />

<div id="PersonForm">
    <table>
        <tr>
            <td>
                First Name:
                <input type="text" ID="tbFirstName_CC4493FF_29A4_4511_B5A3_FBB261A59D4F" runat="server"></input>
            
                 
            </td>
            <td>
                Last Name:
                 <input ID="tbLastName_CC4493FF_29A4_4511_B5A3_FBB261A59D4F" runat="server"></input>
            </td>
        </tr>
        <tr>
            <td>
            <input type="button" value="Save" onclick="Save();" />
                </td>
        </tr>
    </table>
</div>
